import request from '@/utils/request'
/**
 * 资讯管理
 * @param {*} params 
 */
// 分页查询
export function newsPageByQo(code) {
  return request({
    url: '/front/advisement/pageByQo',
    method: 'post',
    params:{
      pageNo: 1,
      pageSize: 20,
      code
    }
  })
}

// 单个查询（详情）
export function newsGetById(id) {
  return request({
    url: '/front/advisement/getById',
    method: 'post',
    params:{
      id
    }
  })
}

// 添加、修改(type有值为修改)
export function newsSave(data, type) {
  return request({
    url: type ? "/dinner/advisement/update" : "/dinner/advisement/save",
    method: "post",
    data
  });
}

export function articlePageByQo(params) {
  return request({
    url: "/dinner/advisement/pageByQo",
    method: "post",
    params
  });
}

// 批量删除
export function newsRemoveByIds(params) {
  return request({
    url: "/dinner/advisement/removeByIds",
    method: "post",
    params
  });
}